home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / prolog / sbprolog / v3 / sim.lha / sim / aux.c next >
C/C++ Source or Header  |  1990-04-12  |  1KB  |  45 lines

  1. /************************************************************************
  2. *                                    *
  3. * The SB-Prolog System                            *
  4. * Copyright SUNY at Stony Brook, 1986; University of Arizona, 1987    *
  5. *                                    *
  6. ************************************************************************/
  7.  
  8. #include "sim.h"
  9.  
  10. /*-----------------------------------------------------------------
  11. SB-Prolog is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY.  No author or distributor
  13. accepts responsibility to anyone for the consequences of using it
  14. or for whether it serves any particular purpose or works at all,
  15. unless he says so in writing.  Refer to the SB-Prolog General Public
  16. License for full details.
  17.  
  18. Everyone is granted permission to copy, modify and redistribute
  19. SB-Prolog, but only under the conditions described in the
  20. SB-Prolog General Public License.   A copy of this license is
  21. supposed to have been given to you along with SB-Prolog so you
  22. can know your rights and responsibilities.  It should be in a
  23. file named COPYING.  Among other things, the copyright notice
  24. and this notice must be preserved on all copies. 
  25. ------------------------------------------------------------------ */
  26. /* aux.c */
  27.  
  28. quit(s)
  29. CHAR_PTR s;
  30. {
  31.    printf(s);
  32.    exit(0);
  33. }
  34.  
  35. /* concatinate s1 and s2 into s3 */
  36.  
  37. scat(s1, s2, s3)
  38. CHAR_PTR s1, s2, s3;
  39. {
  40.    while (*s1)             /* copy s1 into s3, without the EOS */
  41.       *s3++ = *s1++;
  42.    while (*s3++ = *s2++)   /* add s2 onto s3, including the EOS */
  43.       ;
  44. }
  45.